package com.tsj.ai.mcp.controller;

import com.tsj.ai.mcp.service.GetWeatherService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author taoshujian
 * @version 1.0
 * @since 2025-10-30 09:24:41
 */
@RestController
@RequestMapping("/weather")
public class GetWeatherController {

    @Resource
    private GetWeatherService getWeatherService;

    @GetMapping("/{city}")
    public String getWeatherInfo(@PathVariable String city) {
        return getWeatherService.getWeatherInfo(city);
    }
}
